Optimal. Leaf size=198 \[ -\frac{2 a^2 (A b-a B)}{3 b^2 d \left (a^2+b^2\right ) (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (2 A b^3-a B \left (a^2+3 b^2\right )\right )}{b^2 d \left (a^2+b^2\right )^2 \sqrt{a+b \tan (c+d x)}}+\frac{(B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{5/2}}-\frac{(-B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.529017, antiderivative size = 198, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 6, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {3604, 3628, 3539, 3537, 63, 208} \[ -\frac{2 a^2 (A b-a B)}{3 b^2 d \left (a^2+b^2\right ) (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (2 A b^3-a B \left (a^2+3 b^2\right )\right )}{b^2 d \left (a^2+b^2\right )^2 \sqrt{a+b \tan (c+d x)}}+\frac{(B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{d (a-i b)^{5/2}}-\frac{(-B+i A) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{d (a+i b)^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3604
Rule 3628
Rule 3539
Rule 3537
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{\tan ^2(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^{5/2}} \, dx &=-\frac{2 a^2 (A b-a B)}{3 b^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{\int \frac{-a (A b-a B)+b (A b-a B) \tan (c+d x)+\left (a^2+b^2\right ) B \tan ^2(c+d x)}{(a+b \tan (c+d x))^{3/2}} \, dx}{b \left (a^2+b^2\right )}\\ &=-\frac{2 a^2 (A b-a B)}{3 b^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}+\frac{\int \frac{-b \left (a^2 A-A b^2+2 a b B\right )+b \left (2 a A b-a^2 B+b^2 B\right ) \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{b \left (a^2+b^2\right )^2}\\ &=-\frac{2 a^2 (A b-a B)}{3 b^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}-\frac{(A-i B) \int \frac{1+i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 (a-i b)^2}-\frac{(A+i B) \int \frac{1-i \tan (c+d x)}{\sqrt{a+b \tan (c+d x)}} \, dx}{2 (a+i b)^2}\\ &=-\frac{2 a^2 (A b-a B)}{3 b^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}+\frac{(i A-B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 (a+i b)^2 d}-\frac{(i A+B) \operatorname{Subst}\left (\int \frac{1}{(-1+x) \sqrt{a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 (a-i b)^2 d}\\ &=-\frac{2 a^2 (A b-a B)}{3 b^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}-\frac{(A-i B) \operatorname{Subst}\left (\int \frac{1}{-1-\frac{i a}{b}+\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{b (i a+b)^2 d}-\frac{(A+i B) \operatorname{Subst}\left (\int \frac{1}{-1+\frac{i a}{b}-\frac{i x^2}{b}} \, dx,x,\sqrt{a+b \tan (c+d x)}\right )}{(i a-b)^2 b d}\\ &=\frac{(i A+B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a-i b}}\right )}{(a-i b)^{5/2} d}-\frac{(i A-B) \tanh ^{-1}\left (\frac{\sqrt{a+b \tan (c+d x)}}{\sqrt{a+i b}}\right )}{(a+i b)^{5/2} d}-\frac{2 a^2 (A b-a B)}{3 b^2 \left (a^2+b^2\right ) d (a+b \tan (c+d x))^{3/2}}+\frac{2 a \left (2 A b^3-a \left (a^2+3 b^2\right ) B\right )}{b^2 \left (a^2+b^2\right )^2 d \sqrt{a+b \tan (c+d x)}}\\ \end{align*}
Mathematica [C] time = 0.941611, size = 260, normalized size = 1.31 \[ -\frac{b (A b-a B) \left (i (a+i b) \text{Hypergeometric2F1}\left (-\frac{3}{2},1,-\frac{1}{2},\frac{a+b \tan (c+d x)}{a-i b}\right )-(b+i a) \text{Hypergeometric2F1}\left (-\frac{3}{2},1,-\frac{1}{2},\frac{a+b \tan (c+d x)}{a+i b}\right )\right )+3 b B (a+b \tan (c+d x)) \left (i (a+i b) \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},\frac{a+b \tan (c+d x)}{a-i b}\right )-(b+i a) \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},\frac{a+b \tan (c+d x)}{a+i b}\right )\right )+2 (a-i b) (a+i b) (2 a B+A b)+6 b B (a-i b) (a+i b) \tan (c+d x)}{3 b^2 d \left (a^2+b^2\right ) (a+b \tan (c+d x))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.102, size = 12849, normalized size = 64.9 \begin{align*} \text{output too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (A + B \tan{\left (c + d x \right )}\right ) \tan ^{2}{\left (c + d x \right )}}{\left (a + b \tan{\left (c + d x \right )}\right )^{\frac{5}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{2}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{\frac{5}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]